package com.hongtu.xaseataorg1.web;

import com.hongtu.xaseataorg1.service.AccountInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TransferController {
    @Autowired
    AccountInfoService accountInfoService;
    @GetMapping("transfer")
    public String transfer(@RequestParam("amount") Double amount) {
        accountInfoService.updateAccountBalance("1", amount);
        return "转账成功";
    }
}

